User Method
Description
Create a WindowsServices::ActiveDirectory::User object. This is for internal use only. Use a WindowsServices::ActiveDirectory::Domain or WindowsServices::ActiveDirectory::Group object to get a user.
'The follow line assumes that the machine is joined to an Active Directory domain and is allow to query Active Directory. dim domain as WindowsServices::ActiveDirectory::Domain = new WindowsServices::ActiveDirectory::Domain() if domain.CallResult.Success then ?"The domain name is " + domain.Name + "<br/>" else ?"There was an error connecting to an Active Directory domain: " + domain.CallResult.Text + "<br/>" end if ?"The domain name is " + domain.Name + crlf() dim userid as c = "JohnDoe" dim user as p = domain.getUser(userId) if .not. domain.CallResult.Success then ?"There was an error getting the user " + userId + ": " + domain.CallResult.Text + crlf() goto exitTestFunction end if ?user.Name + crlf() exitTestFunction: